#include<stdio.h>
int main()
{
    char s[51];
    char c;
    int i;
    double er,sum;
    sum=0;
    i=0;
    while((c=getchar())!='\n')
    {
        if(c=='2')
            sum++;
        s[i++]=c;
    }
    if(s[0]=='-')
        if(s[i-1]%2==0)
            er=sum/(i-1)*1.5*2*100;     // 注意sum/(i-1)的精度缺失问题；注意i位数问题
        else
            er=sum/(i-1)*1.5*100;
    else
        if(s[i-1]%2==0)
            er=sum/i*2*100;
        else
            er=sum/i*100;
    printf("%.2f%%",er);
    return 0;
}